﻿@model BcdFileListViewModel
@{
    Layout = null;
    ViewBag.Title = "工程项目添加";
}
<script src="/Scripts/jQuery/jquery.validate.min.js" type="text/javascript"></script>
<script src="/Scripts/jQuery/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>
@{Html.EnableClientValidation();}
@using (Html.BeginForm("CreatePost", "FileList", null, FormMethod.Post, new { onsubmit = "return validateCallback(this,refre_jgzl_ajml_index);", @class = "pageForm required-validate" }))
{
    <div class="pageFormContent sortDrag" layouth="60">
        @{string hide = "";
          if (Model.TheBcdProjectInfo.Pr_ID == 0)
          {
              hide = "display:none;";
              <span>请先选择项目</span>
          }
        }
        <table class="tab01 tabNo" width="95%;" style="@(hide)">
            @Html.TextBoxFor(model => model.TheBcdProjectInfo.P_ID, new { @type = "hidden" })
            @Html.TextBoxFor(model => model.TheBcdProjectInfo.Pr_ID, new { @type = "hidden" })
            <tr>
                <td class="td1" style="width: 25%;">项目名称：</td>
                <td>
                    @Html.TextAreaFor(model => model.TheBcdProjectInfo.P_Name, new { cols = "3", @class = "input05" })
                    @Html.ValidationMessageFor(model => model.TheBcdProjectInfo.P_Name)
                </td>
            </tr>
            <tr>
                <td class="td1" style="width: 25%;">项目编号：</td>
                <td>
                    @Html.TextBoxFor(model => model.TheBcdProjectInfo.P_Code, new { @class = "input02" })
                    @Html.ValidationMessageFor(model => model.TheBcdProjectInfo.P_Code)
                </td>
            </tr>
            <tr>
                <td class="td1" style="width: 25%;">归档类型：</td>
                <td>
                    @Html.TextBoxFor(model => model.TheBcdProjectInfo.Fd_ID, new { @type = "hidden" })
                    @Html.TextAreaFor(model => model.TheBcdProjectInfo.Fd_Name, new { @class = "input02", @readonly = "readonly" })
                    <a id="a_file_unit" class="btnLook" title="选择归档类型" href="/CompletionMaterials/FileList/FileType"
                        mask="true" width="350" height="250" lookupgroup="district"></a>
                    @Html.ValidationMessageFor(model => model.TheBcdProjectInfo.Fd_ID)
                </td>
            </tr>
            <tr>
                <td class="td1">编制单位类型：</td>
                <td>
                    @{string acValue = "";}
                    @{switch (Model.TheBcdProjectInfo.P_UType)
                      {
                          case "施工单位": acValue = "GetSegmentJson"; break;
                          case "监理单位": acValue = "GetSupervJson"; break;
                          default: acValue = "GetAllSegmentJson"; break;
                      }}
                    <input id="input_action" type="hidden" value="@acValue" />
                    @Html.TextBoxFor(model => model.TheBcdProjectInfo.P_UType, new { @class = "input02", @readonly = "readonly" })
                </td>
            </tr>
            @{string secStyle = "";}
            @{if (Model.TheBcdProjectInfo.P_UType == "项目法人" || Model.TheBcdProjectInfo.P_UType == "设计单位" || Model.TheBcdProjectInfo.P_UType == "相关单位")
              { secStyle = "display: none;"; }}
            <tr id="tr_fssction" style="@secStyle">
                <td class="td1">标段：</td>
                <td>
                    @Html.TextBoxFor(model => model.TheBcdProjectInfo.P_Section, new { @class = "input02", @readonly = "readonly" })
                    <a id="a_file_unit" class="btnLook" title="选择标段" href="/CompletionMaterials/FileList/SectionUnit"
                        mask="true" width="480" height="480" lookupgroup="district"></a>
                </td>
            </tr>
            <tr>
                <td class="td1">编制单位：</td>
                <td>
                    @Html.TextAreaFor(model => model.TheBcdProjectInfo.P_Unit, new { cols = "3", @class = "input05" })
                    @Html.ValidationMessageFor(model => model.TheBcdProjectInfo.P_Unit)
                </td>
            </tr>
        </table>
    </div>

    <div class="formBar">
        <ul>

            <li style="@hide">
                <button type="submit" class="btn btn-sm">保存</button>
            </li>
            <li>
                <button type="button" class="close btn btn-default btn-sm">取消</button>
            </li>

        </ul>
    </div>
}
